<?php


namespace common\models\service;


use common\models\Campus;

class CampusService extends Campus
{
    /**
     * 统计数量
     * @param $start_time
     * @param $end_time
     * @return bool|int|string
     */
    public static function statistics($start_time,$end_time)
    {
        $where = [];
        if ($start_time&&$end_time){
            $where = ['between','create_time',$start_time,$end_time];
        }
        $num = Campus::find()->where($where)->count();
        return $num??0;
    }
}